<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工管理</title>
 
<style type="text/css">
	.showspan{
		display: none;position: absolute;background-color: fuchsia;width: 150px;
	}
</style>
<script type="text/javascript" src="${ctx}/static/js/jquery-1.8.2.js"></script>
<script type="text/javascript">
	function showDiv(obj){
		$("#"+obj).show();
		$("#"+obj).mouseout(function(){
			$(this).hide();
		});
	}
	
</script>
</head>
<body>
	<center>
		<div>
			<a href="#">添加员工</a>
		</div>
		<hr/>
		<div>
			<table border="1">
				<thead>
					<tr>
						<th>USERNAME</th>
						<th>ENABLED</th>
						<th>USERNAMECN</th>
						<th>AUTHORITY</th>
						<th>MANAGER</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${users }" var="user" varStatus="count">
						<tr>
							<td>${user.userName }</td>
							<td>${user.enabled }</td>
							<td>${user.userNameCN }</td>
							<td>
								<a href="javascript:void(0);" 
									onmousemove="showDiv('span_${count.index }');">权限</a>
								<span class="showspan" id="span_${count.index }">
									员工权限
									<div>
										<table>
											<tr>
												<td>
													1
												</td>
											</tr>
										</table>
									</div>
								</span>
							</td>
							<td>删除</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>		
	</center>
		
</body>
</html>